package fr.univ.surveyonline.question;

import java.io.IOException;
import java.util.List;

import javax.servlet.jsp.JspWriter;

import fr.univ.surveyonline.datastore.DatastoreKeyResponse;

public class RadioButtonChoiceField extends MultipleSuccessorField
{
	@Override
	public void render(JspWriter writer) throws IOException
	{
		List<DatastoreKeyResponse> list = this.getAllKey();
		
		for (DatastoreKeyResponse k : list)
		{
			writer.println("<input type='radio' value='" + k
					+ "' name='answer'>" + this.getAnswer(k) + "</input><br />");
		}
	}
}